import request from '@/config/axios'

// 获取菜单列表
export const getMenulistApi = (params:any) => {
  return request.get({ url: '/api/system/menu/list',params})
}
// 获取菜单下拉树
export const getTreeselectApi = (params) => {
  return request.get({ url: '/api/system/menu/treeselect',params})
}
// 新增菜单类型
export const addMenuApi = (data:any) => {
  return request.post({ url: '/api/system/menu',data:data})
}
// 修改菜单类型
export const editMenuApi = (data:any) => {
  return request.put({ url: '/api/system/menu',data:data})
}
// 删除菜单类型
export const deteleMenuApi = (id:any) => {
  return request.delete({ url: `/api/system/menu/${id}`})
}
// 获取树状图
export const getMenuTreeSelectlistApi = (params:any) => {
  return request.get({ url: '/api/system/menu/treeselect',params})
}
// 获取树状详情
export const getMenuTreeSelectDetailApi = (id:any) => {
  return request.get({ url: `/api/system/menu/roleMenuTreeselect/${id}`})
}
// 获取单个菜单详情
export const getMenuDetailApi = (id:any) => {
  return request.get({ url: `/api/system/menu/${id}`})
}